#pragma once
#include <activemq/library/ActiveMQCPP.h>
#include <decaf/lang/Thread.h>
#include <decaf/lang/Runnable.h>
#include <decaf/util/concurrent/CountDownLatch.h>
#include <decaf/lang/Integer.h>
#include <decaf/util/Date.h>
#include <activemq/core/ActiveMQConnectionFactory.h>
#include <activemq/util/Config.h>
#include <cms/Connection.h>
#include <cms/Session.h>
#include <cms/TextMessage.h>
#include <cms/BytesMessage.h>
#include <cms/MapMessage.h>
#include <cms/MessageProducer.h>
#include <cms/ExceptionListener.h>
#include <cms/MessageListener.h>
#include <stdlib.h>
#include <iostream>
#include <memory>
#include <string>


using namespace activemq::core;
using namespace decaf::util::concurrent;
using namespace decaf::util;
using namespace decaf::lang;
//using namespace cms;
using namespace std;

class CBaseListener: public cms::ExceptionListener, public cms::MessageListener 
{
public:
	CBaseListener(void);
	virtual ~CBaseListener(void);


public:
	virtual void onException( const cms::CMSException& ex );
	virtual void onMessage( const cms::Message* message );
};

namespace stdListen
{
	std::string mb2u8(const char* cont);
	std::string u82mb(const char* cont);
}